django admin.py date format

36

    def time_seconds(self, obj):
        return obj.timefield.strftime("%d %b %Y %H:%M:%S")

    time_seconds.short_description = 'Precise Time'    

    list_display = ('id', 'time_seconds', )

Comments

Submit
0 Comments